<!--新增跑马灯-->
<template>
  <div>
    <el-dialog
      title=""
      :visible.sync="rankShow"
      width="30%"
      @close="cancle"
      center
    >
      <!-- {{ dataview }} -->
      <uploadVideo
        :cateId="dataview.vodCategoryId"
        :objData="{
          title: dataview.title,
          cateId: dataview.vodCategoryId,
          coverURL: dataview.pic,
        }"
        v-model="dataview.linkUrl"
      ></uploadVideo>
      <!-- <span slot="footer" class="dialog-footer">
        <el-button @click="cancle">关闭</el-button>
      </span> -->
    </el-dialog>
  </div>
</template>

<script>
import uploadVideo from "./uploadVideo.vue";
export default {
  components: { uploadVideo },
  data() {
    // const validatecreditRatio = (rule, value, callback) => {
    //   if (value == "") {
    //     callback(new Error("请输入推荐理由标题"));
    //   } else if (value.length > 4) {
    //     callback(new Error("不超过4个字"));
    //   } else {
    //     callback();
    //   }
    // };
    return {
      dataview: {},
      rankShow: false,
    };
  },
  async created() {},
  methods: {
    async openDialog(row) {
      this.dataview = row;
      this.rankShow = true;
    },
    cancle() {
      this.rankShow = false;
    },
    editVideoId(v) {
      this.dataview.videoId = v;
      setTimeout(() => {
        this.$refs.form.validateField("linkUrl");
      }, 100);
    },
  },
};
</script>

<style lang="scss" scoped>
/deep/ .el-select,
/deep/ .el-cascader {
  width: 100%;
}

.product-img {
  width: 1000px;
  display: flex;
  flex-wrap: wrap;
  .product-img-box {
    position: relative;
    .i2 {
      position: absolute;
      right: -1px;
      top: -5px;
    }
  }
  .uploadPic {
    width: 96px;
    height: 96px;
    // margin-left: 10px;
    background: #eeeeee;
    border-radius: 8px;
    position: relative;

    .i1 {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
    }
  }

  img {
    width: 96px;
    height: 96px;
    margin-right: 13px;
  }
}
</style>
